import React, { Component } from 'react'
// 引入路由组件，嵌套路由写在这里
import {Switch, Route} from 'react-router-dom'
// 导入子组件
import Shop from './Shop'
import Cart from './Cart'
import Cate from './Cate'
import My from './My'
import Bottom from './Bottom'

export default class Layout extends Component {
  render() {
    return (
      <div>
        <div className="top">顶部</div>
        <div className="mid">
          <Switch>
            <Route path="/shop" component={Shop}></Route>
            <Route path="/cart" component={Cart}></Route>
            <Route path="/cate" component={Cate}></Route>
            <Route path="/my" component={My}></Route>
          </Switch>
        </div>
        <div className="bottom">
          <Bottom></Bottom>
        </div>
      </div>
    )
  }
}
